package spec.ocl_mcg;

//import org.eclipse.ocl.ecore.CallExp;
import graph.mcg.CGNode;

import org.eclipse.ocl.ecore.PropertyCallExp;

import tools.Tools;

public class PropertyCallExpNode extends TreeNode implements LeafNode {
	private String referedproperty;
	
//	public PropertyCallExpNode(CallExp exp){
//		super(exp);
//	}
	public PropertyCallExpNode(PropertyCallExp exp) {
		this.referedproperty = exp.getReferredProperty().getName();
		if (exp.isMarkedPre()) {
			referedproperty = "O" + Tools.firstToUpperCase(referedproperty);
		}else{
			referedproperty = "N" + Tools.firstToUpperCase(referedproperty);
		}
		expresult = referedproperty;
	}


	public String getReferedproperty() {
		return referedproperty;
	}


	public void setReferedproperty(String referedproperty) {
		this.referedproperty = referedproperty;
	}


	@Override
	public CGNode toCG() {
		// TODO Auto-generated method stub
//		ConstraintNode cfgnode = new ConstraintNode(this);
//		cfgnode.setConstraint(referedproperty);
//		cfgnode.setNextnode(null);
		return null;
	}


	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

}
